﻿using JetBrains.Annotations;

public class PlayerAirAtkHFSM : PlayerBaseHFSM {
	public PlayerAirAtkHFSM(PlayerController controller, PlayerStateEnum stateName, State<PlayerStateEnum> superFSM, StateFactory<PlayerStateEnum> factory) : base(controller, stateName, superFSM, factory) {
		AddConditionToSelf(() => !_controller.IsOnGround && AtkInput);

		AddNewTransition(PlayerStateEnum.GroundHFSM, () => _controller.IsOnGround && _controller.StateData.IsDashOver);
		AddNewTransition(PlayerStateEnum.AirHFSM, () => !_controller.IsOnGround && CurState is not (PlayerDashDown or PlayerAirTick) && _controller.IsAnimPlayOver());
	}

	bool AtkInput => _controller.HandWeaponInput || _controller.TickInput || _controller.BowInput;
}